import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.util.Scanner;
//Client
public class Test5 {
    public static void main(String[] args) throws IOException {
        //TCP Socket
        Socket socket = new Socket("localhost", 8080);
        OutputStream os = socket.getOutputStream();
        Scanner scanner = new Scanner(System.in);
        String message = scanner.nextLine();
        os.write(message.getBytes());
        os.close();
        socket.close();
    }
}
